import React from 'react';
import {Scene} from 'enoad-common/src/core/router';

import AppGateWay from '../../gateWay';
import {R} from '../../core';
import _ from 'lodash';
const menu = require('./menu.json');

export function initSences() {
  let screens = new Array();
  if (menu && menu.code == 200) {
    _.forEach(menu.menus, item => {
      screens.push(
        <Scene
          navigationBarStyle={{backgroundColor: R.color.titleBg}}
          key={item.id}
          title={item.title}
          component={AppGateWay}
          Image={item.icon}
          selectedImage={item.icon}
        />,
      );
    });
  }
  return screens;
}
